import Index from '../pages/index/index.vue';
import IndexPages from '../pages/index/IndexPages.vue';
import infoPages from '../pages/index/infoPages.vue';
import UserLogin from '../pages/User/UserLogin.vue';
import UserIndex from '../pages/User/UserIndex.vue';
import UserRegister from '../pages/User/UserRegister.vue';
import UserEmployer from '../pages/User/UserEmployer.vue';
import UserBureau from '../pages/User/UserBureau.vue';
import UserAdminPage from '../pages/User/UserAdminPage.vue'
import UserEmployerAdd from '../pages/User/UserEmployerAdd.vue';
import AdminSearchBur from '../pages/User/UserAdminSearchBur.vue'
import AdminSearEmployee from '../pages/User/UserAdminSeEmployee.vue'
import BaseWelcomePage from '../pages/User/BaseWelcomePage.vue'
import RiskManagement from '../pages/User/RiskManagement.vue'
import { RouteRecordRaw } from "vue-router";
import infoPagesSearch from '../pages/index/infoPages/infoPagesSearch.vue'
import search from '../pages/index/infoPages/search/search.vue'
import guide from '../pages/index/infoPages/search/guide.vue'
import transfer from '../pages/index/infoPages/search/transfer.vue'
import pensionTransfer from '../pages/index/infoPages/pensionTransfer.vue'
import guide2 from '../pages/index/infoPages/insurance/guide.vue'
import infoPagesBureau from '../pages/index/infoPages/infoPagesBureau.vue'
import UserClaim from "../pages/User/UserClaim.vue";
import BureauDataAnalyze from "../pages/User/Bureau/BureauDataAnalyze.vue";
import BureauAiAnalyze from '../pages/User/Bureau/BureauAiAnalyze.vue';
import AIData from '../pages/User/Bureau/AIData.vue';
import UserProfile from '../pages/User/UserProfile.vue';
import StandaloneUserProfile from '../pages/User/StandaloneUserProfile.vue';
import StandaloneUserClaim from '../pages/User/StandaloneUserClaim.vue';
import BlockchainBrowser from '../pages/User/BlockchainBrowser.vue';

declare module 'vue-router' {
  interface _RouteRecordBase {
    hidden?: boolean | string | number
  }
}

const routes: RouteRecordRaw[] = [
  { path: '/', redirect: '/index' },
  //首页父亲路由index 里面只放header和navi 点击navi来跳转
  {
    path: '/index',
    component: Index,
    redirect: '/index/top',
    meta: {
      hidden: false,
    },
    children: [
      { path: 'top', component: IndexPages },
      { path: 'infoPages', component: infoPages },
      {
        path: 'infoPagesSearch',
        component: infoPagesSearch,
        children: [
          { path: 'search', component: search },
          { path: 'guide', component: guide },
          { path: 'transfer', component: transfer },
        ]
      },
      {
        path: 'infoPagesTransfer',
        component: pensionTransfer,
        children: [
          { path: 'guide', component: guide2 },
          { path: 'transfer', component: transfer },
        ]
      },
      {
        path: 'infoPagesBureau',
        component: infoPagesBureau,
        children: [
          { path: 'search', component: search },
          { path: 'guide', component: guide },
          { path: 'transfer', component: transfer },
        ]
      },
    ]

  },
  { path: '/user/login', component: UserLogin },

  {
    path: '/user/index',
    component: UserIndex,
    children: [
      { path: 'employer', component: UserEmployer },
      { path: 'claim', component: UserClaim },
      { path: 'bureau', component: UserBureau },
      { path: 'admin', component: UserAdminPage },
      { path: 'employerAdd', component: UserEmployerAdd },
      { path: 'employerSearchBureau', component: AdminSearchBur },
      { path: 'adminSearchEmployee', component: AdminSearEmployee },
      { path: 'welcome', component: BaseWelcomePage },
      { path: 'bureau/dataAnalyze', component: BureauDataAnalyze },
      // { path: 'bureau/aiAnalyze', component: BureauAiAnalyze },
      { path: 'bureau/aiAnalyze', component: AIData },
      { path: 'profile', component: UserProfile },
      { path: 'risk-management', component: RiskManagement },
    ],
  },
  { path: '/user/register', component: UserRegister },
  { path: '/user/standalone/profile', component: StandaloneUserProfile },
  { path: '/user/standalone/claim', component: StandaloneUserClaim },
  { path: '/user/blockchain-browser', component: BlockchainBrowser },
];

export default routes;
